package com.hsgene.supplier.service.api;

import com.hsgene.common.util.result.ApiResult;
import com.hsgene.common.util.result.NullObject;
import com.hsgene.supplier.service.api.impl.GeneticAccountServiceImpl;
import com.hsgene.user.domain.GeneticTestingOperationAccount;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;

/**
 * @Description: //TODO
 * @ProjectName: hdas-geneshop-server
 * @Package: com.hsgene.supplier.service.api
 * @Author: FX
 * @CreateDate: 2019/1/4 16:19
 * @Version: 1.0
 * Copyright: Copyright (c) 2019
 */
@FeignClient(name = "ms-mod-user", path = "/v1.0/genetic/testing/account", fallback = GeneticAccountServiceImpl.class)
public interface GeneticAccountService {
    /**
     * 添加管理员用户
     *
     * @param account 用户信息
     * @return 添加结果
     */
    @PostMapping("")
    ApiResult<NullObject> addAccount(
            @RequestBody GeneticTestingOperationAccount account);

    /**
     * 添加机构用户
     *
     * @param account 用户信息
     * @return 添加结果
     */
    @PostMapping("agency")
    ApiResult<NullObject> addAgencyAccount(
            @RequestBody GeneticTestingOperationAccount account);

    /**
     * 修改机构用户
     *
     * @param account 用户信息
     * @return 添加结果
     */
    @PutMapping("agency")
    ApiResult<NullObject> updateAgencyAccount(
            @RequestBody GeneticTestingOperationAccount account);

    /**
     * 重置机构用户密码
     *
     * @param accountId 用户id
     * @return 操作结果
     */
    @PutMapping("{account_id}/password")
    ApiResult<NullObject> resetAccountPassword(
            @PathVariable("account_id") String accountId);
}
